|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectga.view.processor.OffscreenProcessor
public class OffscreenProcessor
Scene processor for offscreen rendering of textures. Allows to render a scene onto a texture.
Field Summary | |
---|---|
private com.jme3.asset.AssetManager |
assetManager
|
private com.jme3.math.ColorRGBA |
backgroundColor
|
private com.jme3.font.BitmapText |
fpsText
|
private com.jme3.font.BitmapFont |
guiFont
|
private com.jme3.scene.Node |
guiNode
|
private com.jme3.renderer.ViewPort |
guiViewPort
|
private static java.util.logging.Logger |
LOGGER
|
private com.jme3.material.Material |
material
|
private com.jme3.texture.FrameBuffer |
offscreenBuffer
|
private com.jme3.renderer.Camera |
offscreenCam
|
private com.jme3.scene.Node |
offscreenScene
|
private com.jme3.renderer.ViewPort |
offscreenView
|
private int |
renderHeight
|
private int |
renderWidth
|
private com.jme3.renderer.RenderManager |
rm
|
private com.jme3.system.AppSettings |
settings
|
private java.lang.String |
text
|
private com.jme3.texture.Texture2D |
texture
|
private java.lang.String |
textureKey
|
Constructor Summary | |
---|---|
OffscreenProcessor(com.jme3.asset.AssetManager assetManager,
com.jme3.system.AppSettings settings,
com.jme3.scene.Node scene,
com.jme3.material.Material material,
java.lang.String textureKey)
Creates a new offscreen texture processor with a SimpleTextured material. |
Method Summary | |
---|---|
void |
cleanup()
|
com.jme3.math.ColorRGBA |
getBackgroundColor()
Getter for the background color of the scene. |
com.jme3.renderer.Camera |
getCamera()
Getter for the camera. |
com.jme3.material.Material |
getMaterial()
Getter for the material to render to. |
private void |
init()
Pre-initializes the processor. |
void |
initialize(com.jme3.renderer.RenderManager rm,
com.jme3.renderer.ViewPort vp)
|
boolean |
isInitialized()
|
void |
postFrame(com.jme3.texture.FrameBuffer out)
|
void |
postQueue(com.jme3.renderer.queue.RenderQueue rq)
|
void |
preFrame(float tpf)
|
void |
reshape(com.jme3.renderer.ViewPort vp,
int w,
int h)
|
void |
setBackgroundColor(com.jme3.math.ColorRGBA backgroundColor)
Setter for the background color of the scene. |
void |
setText(java.lang.String text)
Sets a text that is displayed on the GUI. |
void |
setTextureSize(int width,
int height)
Sets the size of the offscreen texture. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final java.util.logging.Logger LOGGER
private int renderWidth
private int renderHeight
private com.jme3.texture.FrameBuffer offscreenBuffer
private com.jme3.renderer.Camera offscreenCam
private final com.jme3.scene.Node offscreenScene
private com.jme3.renderer.ViewPort offscreenView
private final com.jme3.asset.AssetManager assetManager
private com.jme3.renderer.RenderManager rm
private final com.jme3.system.AppSettings settings
private com.jme3.renderer.ViewPort guiViewPort
private com.jme3.scene.Node guiNode
private com.jme3.font.BitmapText fpsText
private com.jme3.font.BitmapFont guiFont
private java.lang.String text
private com.jme3.math.ColorRGBA backgroundColor
private com.jme3.texture.Texture2D texture
private final com.jme3.material.Material material
private final java.lang.String textureKey
Constructor Detail |
---|
public OffscreenProcessor(com.jme3.asset.AssetManager assetManager, com.jme3.system.AppSettings settings, com.jme3.scene.Node scene, com.jme3.material.Material material, java.lang.String textureKey)
assetManager
- The AssetManagersettings
- The application settingsscene
- The scene that will be renderedmaterial
- The material to apply the texture totextureKey
- The texture key used to apply the textureMethod Detail |
---|
private void init()
public void setTextureSize(int width, int height)
width
- With of the textureheight
- Height of the texturepublic void initialize(com.jme3.renderer.RenderManager rm, com.jme3.renderer.ViewPort vp)
initialize
in interface com.jme3.post.SceneProcessor
public void setText(java.lang.String text)
text
- GUI text.public void reshape(com.jme3.renderer.ViewPort vp, int w, int h)
reshape
in interface com.jme3.post.SceneProcessor
public boolean isInitialized()
isInitialized
in interface com.jme3.post.SceneProcessor
public void preFrame(float tpf)
preFrame
in interface com.jme3.post.SceneProcessor
public void postQueue(com.jme3.renderer.queue.RenderQueue rq)
postQueue
in interface com.jme3.post.SceneProcessor
public void postFrame(com.jme3.texture.FrameBuffer out)
postFrame
in interface com.jme3.post.SceneProcessor
public void cleanup()
cleanup
in interface com.jme3.post.SceneProcessor
public com.jme3.renderer.Camera getCamera()
public com.jme3.material.Material getMaterial()
public com.jme3.math.ColorRGBA getBackgroundColor()
public void setBackgroundColor(com.jme3.math.ColorRGBA backgroundColor)
backgroundColor
- The color of the background
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |